package com.chenjiagou.bookingdemo.entity;

import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class Booking {
    private Long id;             // 订单ID（主键、自增）
    private String bookingNo;   // 订单编号（varchar(32)）
    private Long userId;        // 用户ID（关联用户表）
    private Long flightId;      // 航班ID（关联航班表）
    private Long seatClassId;  // 舱位ID（关联舱位表）

    // 状态：0-待支付, 1-已付定金, 2-已全款, 3-出票, 4-取消
    private Byte status;

    private BigDecimal totalAmount; // 总金额（decimal(10,2)）
    private BigDecimal depositPaid; // 已付定金（decimal(10,2)）
    private Date expireTime;        // 过期时间
    private Date createdAt;         // 创建时间

    // Getter & Setter
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public String getBooking_no() { return bookingNo; }
    public void setBooking_no(String booking_no) { this.bookingNo = booking_no; }

    public Long getUser_id() { return userId; }
    public void setUser_id(Long user_id) { this.userId = user_id; }

    public Long getFlight_id() { return flightId; }
    public void setFlight_id(Long flight_id) { this.flightId = flight_id; }

    public Long getSeat_class_id() { return seatClassId; }
    public void setSeat_class_id(Long seat_class_id) { this.seatClassId = seat_class_id; }

    public Byte getStatus() { return status; }
    public void setStatus(Byte status) { this.status = status; }

    public BigDecimal getTotal_amount() { return totalAmount; }
    public void setTotal_amount(BigDecimal total_amount) { this.totalAmount = total_amount; }

    public BigDecimal getDeposit_paid() { return depositPaid; }
    public void setDeposit_paid(BigDecimal deposit_paid) { this.depositPaid = deposit_paid; }

    public Date getExpire_time() { return expireTime; }
    public void setExpire_time(Date expire_time) { this.expireTime = expire_time; }

    public Date getCreated_at() { return createdAt; }
    public void setCreated_at(Date created_at) { this.createdAt = created_at; }
}